/// Replicating Table XX
clear 
import delimited "06-Pooled-Offensiveness/data/clean_data.csv"

//Table S2
xi: reg offensive female male noname if experiment1==0, r 
di e(r2_a)
///subset to women only
xi: reg offensive female male noname if experiment1==0 & gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive female male noname if experiment1==0 & gender=="male", r 
di e(r2_a)

/// Table S3
///50 or up as offensive only
xi: reg offensive_50 female male noname i.experiment1, r 
di e(r2_a)
///subset to women only
xi: reg offensive_50 female male noname i.experiment1 if gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_50 female male noname i.experiment1 if gender=="male", r 
di e(r2_a)

///40 or up as offensive only
xi: reg offensive_40 female male noname i.experiment1, r 
di e(r2_a)
///subset to women only
xi: reg offensive_40 female male noname i.experiment1 if gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_40 female male noname i.experiment1 if gender=="male", r 
di e(r2_a)

///30 or up as offensive only
xi: reg offensive_30 female male noname i.experiment1, r 
di e(r2_a)
///subset to women only
xi: reg offensive_30 female male noname i.experiment1 if gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_30 female male noname i.experiment1 if gender=="male", r 
di e(r2_a)

///20 or up as offensive only
xi: reg offensive_20 female male noname i.experiment1, r 
di e(r2_a)
///subset to women only
xi: reg offensive_20 female male noname i.experiment1 if gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_20 female male noname i.experiment1 if gender=="male", r 
di e(r2_a)

///Table S7
//main effect of binary offensive response (pooled)
xi: reg offensive_binary female male noname i.experiment1, r 
di e(r2_a)
//main effect - study 1 (binary measure)
xi: reg offensive_binary female male noname if experiment1==1, r 
di e(r2_a)
//main effect - study 2 (ordinal measure)
xi: reg offensive female male noname if experiment1==0, r 
di e(r2_a)
//main effect - study 2 (binary measure)
xi: reg offensive_binary female male noname if experiment1==0, r 
di e(r2_a)

//main effect - study 1
xi: reg offensive_binary female male noname if experiment1==1, r 
di e(r2_a)
///subset to women only
xi: reg offensive_binary female male noname if experiment1==1 & gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_binary female male noname if experiment1==1 & gender=="male", r 
di e(r2_a)

//main effect - study 2 
xi: reg offensive_binary female male noname if experiment1==0, r 
di e(r2_a)
///subset to women only
xi: reg offensive_binary female male noname if experiment1==0 & gender=="female", r 
di e(r2_a)
///subset to men only
xi: reg offensive_binary female male noname if experiment1==0 & gender=="male", r 
di e(r2_a)

///Table S16
//main effect of binary offensive response (pooled)
xi: reg offensive_binary female male noname i.experiment1 if responded == 100, r 
di e(r2_a)
//main effect - study 1 (binary measure)
xi: reg offensive_binary female male noname if experiment1==1 & responded == 100, r 
di e(r2_a)
//main effect - study 2 (binary measure)
xi: reg offensive_binary female male noname if experiment1==0 & responded == 100, r 
di e(r2_a)
//women only
xi: reg offensive_binary female male noname i.experiment1 if responded == 100 & gender == "female", r 
di e(r2_a)
//men only
xi: reg offensive_binary female male noname i.experiment1 if responded == 100 & gender == "male", r 
di e(r2_a)

//Table S22
//main effect of binary offensive response (pooled)
xi: logit offensive_binary female male noname i.experiment1, r 
di e(r2_a)
//main effect - study 1 (binary measure)
xi: logit offensive_binary female male noname if experiment1==1, r 
di e(r2_a)
//main effect - study 2 (binary measure)
xi: logit offensive_binary female male noname if experiment1==0, r 
di e(r2_a)
//women only
xi: logit offensive_binary female male noname i.experiment1 if gender == "female", r 
di e(r2_a)
//men only
xi: logit offensive_binary female male noname i.experiment1 if gender == "male", r 
di e(r2_a)

///Table S25
///Presented Table 
//main effect of binary offensive response (pooled)
xi: reg offensive_binary female male noname i.experiment1, r cluster(texterid)
di e(r2_a)
//main effect - study 1 (binary measure)
xi: reg offensive_binary female male noname if experiment1==1, r cluster(texterid)
di e(r2_a)
//main effect - study 2 (binary measure)
xi: reg offensive_binary female male noname if experiment1==0, r cluster(texterid)
di e(r2_a)
//main effect of binary offensive response (pooled) women only
xi: reg offensive_binary female male noname i.experiment1 if gender == "female", r cluster(texterid)
di e(r2_a)
//main effect of binary offensive response (pooled) men only
xi: reg offensive_binary female male noname i.experiment1 if gender == "male", r cluster(texterid)
di e(r2_a)

//Table S28
xi: ivreg offensive_binary i.experiment1 (femaleinstrument maleinstrument nonameinstrument = female male noname), r 
di e(r2_a)
//study 1 only
xi: ivreg offensive_binary (femaleinstrument maleinstrument nonameinstrument = female male noname) if experiment1 == 1, r 
di e(r2_a)
//study 2 only
xi: ivreg offensive_binary (femaleinstrument maleinstrument nonameinstrument = female male noname) if experiment1 == 0, r 
di e(r2_a)
///subset to women only
xi: ivreg offensive_binary i.experiment1 (femaleinstrument maleinstrument nonameinstrument = female male noname) if gender=="female", r 
di e(r2_a)
///subset to men only
xi: ivreg offensive_binary i.experiment1 (femaleinstrument maleinstrument nonameinstrument = female male noname) if gender=="male", r 
di e(r2_a)

//volunteer gender
//women volunteers
xi: reg offensive_binary female male noname if experiment1 == 1 & textergender == "Woman", r 
di e(r2_a)
//men volunteers
xi: reg offensive_binary female male noname if experiment1 == 1 & textergender == "Man", r 
di e(r2_a)

